<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>生命周期</title>
</head>

<body>
    <div id="app">
        {{title}}
    </div>
    <script src="../libs/vue/vue.js"></script>
    <script>
        const vw = new Vue({
            el: '#app',
            data: {
                title: 'Hellow'
            },
            //创建
            beforeCreate() {
                console.log('beforCreate', this.$data)
            },
            created() {
                console.log('created', this.$data)
            },
            //挂载
            beforeMount() {
                console.log('beforeMount', this.$el)
            },
            mounted() {
                console.log('mounted', this.$el)
            },
            //更新
            beforeUpdate() {
                console.log('beforUpdate')

            },
            updated() {
                console.log('updated')
            },
            //销毁
            beforeDestroy() {
                console.log('beforeDestroy')
            },
            destroyed() {
                console.log('destroyed')
            },
        })
    </script>
</body>

</html>